import request from '@/utils/request'

// 查询缴费记录列表
export function listRecord(query) {
  return request({
    url: '/training/record/list',
    method: 'get',
    params: query
  })
}

// 查询缴费记录详细
export function getRecord(paymentRecordId) {
  return request({
    url: '/training/record/' + paymentRecordId,
    method: 'get'
  })
}

// 新增缴费记录
export function addRecord(data) {
  return request({
    url: '/training/record',
    method: 'post',
    data: data
  })
}

// 修改缴费记录
export function updateRecord(data) {
  return request({
    url: '/training/record',
    method: 'put',
    data: data
  })
}

// 删除缴费记录
export function delRecord(paymentRecordId) {
  return request({
    url: '/training/record/' + paymentRecordId,
    method: 'delete'
  })
}



//列表
export function paymentRecordList(query) {
  return request({
    url: '/training/record/paymentRecordList',
    method: 'get',
    params: query
  })
}


//获取缴费记录详细信息
export function getPayInfo(paymentRecordId) {
  return request({
    url: '/training/record/getPayInfo/' + paymentRecordId,
    method: 'get',
    params: paymentRecordId
  })
}

//更改缴费方式   转账状态
export function changePay(data) {
  return request({
    url: '/training/record/changePay',
    method: 'put',
    data: data
  })
}







// 退费申请
export function getRefundInfo(paymentRecordId) {
  return request({
    url: '/training/record/getRefundInfo/' + paymentRecordId,
    method: 'get',
    params: paymentRecordId
  })
}

